﻿/*==============================================================
 * PromoteMsgListMapping.cs
 * Copyright (C) 2014 贵州惠众互联 Inc. All rights reserved.
 *==============================================================
 * Author:   罗应红
 * Date:     2014/02/17 10:35:59.
 * Version:  1.0
 * QQ:		 88962800
*==============================================================*/

using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using QDT.Core.Domain;

namespace QDT.Core.MSData.Mapping {
    public class PromoteMsgListMapping:EntityTypeConfiguration<PromoteMsgList> {
        public PromoteMsgListMapping() {
            HasKey(o => o.ID);
            Property(o => o.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("id");
            Property(o => o.Dest).HasColumnName("dest");
            Ignore(o=>o.SendType);
            Property(o => o.InnerSendType).HasColumnName("send_type");
            Property(o => o.Content).HasColumnName("content");
            Property(o => o.Title).HasColumnName("title");
            Property(o => o.SendTime).HasColumnName("send_time");
            Property(o => o.IsSend).HasColumnName("is_send");
            Property(o => o.CreateTime).HasColumnName("create_time");
            Property(o => o.UserId).HasColumnName("user_id");
            Property(o => o.Result).HasColumnName("result");
            Property(o => o.IsSuccess).HasColumnName("is_success");
            Property(o => o.IsHtml).HasColumnName("is_html");
            Property(o => o.MsgId).HasColumnName("msg_id");
            ToTable(DB.TPref("promote_msg_list"));
        }
    }
}